﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TV4Home.WebInterface.UI.Help
{
    public partial class HelpMasterPage : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // hide sitemappath if there's only the root node
            pnSiteMapPath.Visible = (smpHelpSiteMapPath.Provider.CurrentNode != smpHelpSiteMapPath.Provider.RootNode);

            // set the page title to the title of the current sitemap node
            (this.Master as WebSiteMaster).PageTitle = String.Format(Properties.Resources.CommonPageTitle, this.smpHelpSiteMapPath.Provider.CurrentNode.Title);
        }
    }
}